/// appKey : "9zbkKqww62boWFVfSJvTY44itoS8Ui7HXBQbZKic7YqMFfpqw5MusPiEX1yxZE96"
/// bedId : null
/// branchId : 6627
/// breath : 35
/// code : null
/// content : "{\"appKey\":\"9zbkKqww62boWFVfSJvTY44itoS8Ui7HXBQbZKic7YqMFfpqw5MusPiEX1yxZE96\",\"breath\":35,\"code\":null,\"data\":null,\"deviceSn\":\"CA30132500CA459F\",\"heart\":20,\"leaveBed\":0,\"m4g\":false,\"move\":0,\"msg\":null,\"sn\":\"ca30132500ca459f\",\"time\":null,\"token\":\"7OzvESCvN4PbglTZVAKmSssFRMYNQoZkbgiEXUzK2i8h4pibYZgo/+LUa9T9/gkVZHDgCgMsjG7Najt+uQzKb67/okgEDTD5gp4U8fcbMrfT5wESwHpQsIz4m5iDNJpmfvXa8O+LsKEeQ3ZXNyQwgw==\",\"wifi\":true}"
/// createdBy : ""
/// createdDate : "2022-08-05 17:05:27"
/// data : null
/// heart : 20
/// id : 22
/// leaveBed : 0
/// m4g : false
/// move : 0
/// msg : null
/// saasId : 1000
/// sn : "CA30132500CA459F"
/// subType : "11"
/// tenantId : 1000
/// time : "2022-08-05 17:05:27"
/// token : "7OzvESCvN4PbglTZVAKmSssFRMYNQoZkbgiEXUzK2i8h4pibYZgo/+LUa9T9/gkVZHDgCgMsjG7Najt+uQzKb67/okgEDTD5gp4U8fcbMrfT5wESwHpQsIz4m5iDNJpmfvXa8O+LsKEeQ3ZXNyQwgw=="
/// type : "5"
/// updatedBy : ""
/// updatedDate : "2022-08-05 17:05:27"
/// wifi : true

class MattressRecordData{
  List<MattressDetailData>? recordList;
  num? leaveBedNum;


  MattressRecordData({this.recordList, this.leaveBedNum});

  Map<String, dynamic> toJson() {
    return {
      'recordList': this.recordList?.map((e) => e.toJson()).toList(),
      'leaveBedNum': this.leaveBedNum,
    };
  }

  factory MattressRecordData.fromJson(Map<String, dynamic> map) {
    return MattressRecordData(
      recordList: ((map['recordList'] as List)??[]).map((e) => MattressDetailData.fromJson(e)).toList(),
      leaveBedNum: map['leaveBedNum'] as num,
    );
  }
}
class MattressDetailData {
  MattressDetailData({
      this.appKey, 
      this.bedId, 
      this.branchId, 
      this.breath, 
      this.code, 
      this.content, 
      this.createdBy, 
      this.createdDate, 
      this.data, 
      this.heart, 
      this.id, 
      this.leaveBed, 
      this.m4g, 
      this.move, 
      this.msg, 
      this.saasId, 
      this.sn, 
      this.subType, 
      this.tenantId, 
      this.time, 
      this.token, 
      this.type, 
      this.updatedBy, 
      this.updatedDate, 
      this.wifi,});

  MattressDetailData.fromJson(dynamic json) {
    appKey = json['appKey'];
    bedId = json['bedId'];
    branchId = json['branchId'];
    breath = json['breath'];
    code = json['code'];
    content = json['content'];
    createdBy = json['createdBy'];
    createdDate = json['createdDate'];
    data = json['data'];
    heart = json['heart'];
    id = json['id'];
    leaveBed = json['leaveBed'];
    m4g = json['m4g'];
    move = json['move'];
    msg = json['msg'];
    saasId = json['saasId'];
    sn = json['sn'];
    subType = json['subType'];
    tenantId = json['tenantId'];
    time = json['time'];
    token = json['token'];
    type = json['type'];
    updatedBy = json['updatedBy'];
    updatedDate = json['updatedDate'];
    wifi = json['wifi'];
  }
  String? appKey;
  dynamic bedId;
  num? branchId;
  num? breath;
  dynamic code;
  String? content;
  String? createdBy;
  String? createdDate;
  dynamic data;
  num? heart;
  num? id;
  num? leaveBed;
  bool? m4g;
  num? move;
  dynamic msg;
  num? saasId;
  String? sn;
  String? subType;
  num? tenantId;
  String? time;
  String? token;
  String? type;
  String? updatedBy;
  String? updatedDate;
  bool? wifi;
MattressDetailData copyWith({  String? appKey,
  dynamic bedId,
  num? branchId,
  num? breath,
  dynamic code,
  String? content,
  String? createdBy,
  String? createdDate,
  dynamic data,
  num? heart,
  num? id,
  num? leaveBed,
  bool? m4g,
  num? move,
  dynamic msg,
  num? saasId,
  String? sn,
  String? subType,
  num? tenantId,
  String? time,
  String? token,
  String? type,
  String? updatedBy,
  String? updatedDate,
  bool? wifi,
}) => MattressDetailData(  appKey: appKey ?? this.appKey,
  bedId: bedId ?? this.bedId,
  branchId: branchId ?? this.branchId,
  breath: breath ?? this.breath,
  code: code ?? this.code,
  content: content ?? this.content,
  createdBy: createdBy ?? this.createdBy,
  createdDate: createdDate ?? this.createdDate,
  data: data ?? this.data,
  heart: heart ?? this.heart,
  id: id ?? this.id,
  leaveBed: leaveBed ?? this.leaveBed,
  m4g: m4g ?? this.m4g,
  move: move ?? this.move,
  msg: msg ?? this.msg,
  saasId: saasId ?? this.saasId,
  sn: sn ?? this.sn,
  subType: subType ?? this.subType,
  tenantId: tenantId ?? this.tenantId,
  time: time ?? this.time,
  token: token ?? this.token,
  type: type ?? this.type,
  updatedBy: updatedBy ?? this.updatedBy,
  updatedDate: updatedDate ?? this.updatedDate,
  wifi: wifi ?? this.wifi,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['appKey'] = appKey;
    map['bedId'] = bedId;
    map['branchId'] = branchId;
    map['breath'] = breath;
    map['code'] = code;
    map['content'] = content;
    map['createdBy'] = createdBy;
    map['createdDate'] = createdDate;
    map['data'] = data;
    map['heart'] = heart;
    map['id'] = id;
    map['leaveBed'] = leaveBed;
    map['m4g'] = m4g;
    map['move'] = move;
    map['msg'] = msg;
    map['saasId'] = saasId;
    map['sn'] = sn;
    map['subType'] = subType;
    map['tenantId'] = tenantId;
    map['time'] = time;
    map['token'] = token;
    map['type'] = type;
    map['updatedBy'] = updatedBy;
    map['updatedDate'] = updatedDate;
    map['wifi'] = wifi;
    return map;
  }

}